﻿using System.Net.Sockets;

namespace Net.Client
{
    /// <summary>
    /// Tcp客户端
    /// </summary>
    public class TcpClientUnit : Client
    {
        protected override void OnCreateSocket(string ipAddress, int port)
        {
            Client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
            {
                SendBufferSize = Config.SendBufferSize,
                ReceiveBufferSize = Config.ReceiveBufferSize,
                NoDelay = true
            };
        }
    }
}